package com.qfedu.wfx1.service.impl;

import com.qfedu.wfx1.mapper.ImagesMapper;
import com.qfedu.wfx1.po.Images;
import com.qfedu.wfx1.service.IImagesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ImagesService implements IImagesService{
    @Resource
    private ImagesMapper imagesMapper;
    @Override
    public Integer insertImage(Images images) {
        Integer imageId = imagesMapper.insertImage(images);
        return (int)images.getImageId();
    }

    @Override
    public Images queryImageExistByMD5(String imageMd5) {
        return imagesMapper.queryImageExistByMD5(imageMd5);
    }

    @Override
    public void updateImageType(String imageType, String fkId, String imageId) {
        imagesMapper.updateImageType(imageType, fkId, imageId);
    }
}
